<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel='stylesheet' href='/js/bootstrap/css/bootstrap.min.css' />
<link rel="stylesheet" type="text/css"
	href="/js/easyui/themes/bootstrap/easyui.css"/>
<link rel='stylesheet' href='/js/selfcss/login.css' />
<script type="text/javascript" src="/js/selfjs/jquery-1.11.1.js"></script>
<script type="text/javascript" src="/js/easyui/jquery.easyui.min.js"></script>
</head>

<body>
	<div class="container">
		<div class="row">
			<div class="col-md-offset-3 col-md-6">
				<form class="form-horizontal" id="loginForm">
					<span class="heading">用户登录</span>
					<div class="form-group">
						<input type="email" class="form-control" id="username"
							name="username" placeholder="用户名或电子邮件" /> <i class="fa fa-user"></i>
					</div>
					<div class="form-group help">
						<input type="password" class="form-control" id="password"
							name="password" placeholder="密　码" /> <i class="fa fa-lock"></i>
						<a href="#" class="fa fa-question-circle"></a>
					</div>
					<div class="form-group">
						<div class="main-checkbox">
							<input type="checkbox" value="None" id="checkbox1" name="check" />
							<label for="checkbox1"></label>
						</div>
						<span class="text">Remember me</span> <a class="btn btn-default"
							onclick="subForm()">登陆</a>
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	function subForm() {
		$.ajax({
			type : "POST",
			url : "sysUser/checkUser",
			data : $('#loginForm').serialize(),
			error : function(request) {
				$.messager.alert('失败信息', "连接错误", 'error');
			},
			success : function(data) {
				if (data.status == '888') {
					window.location.href = '/index';
				} else {
					$.messager.alert('失败信息', data.message, 'error');
				}
			}
		});
	}
</script>
</html>